package com.example.demo.repository;

import com.example.demo.entity.SaleOrderItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 销售订单明细数据访问层
 */
@Repository
public interface SaleOrderItemRepository extends JpaRepository<SaleOrderItem, Long> {
    
    List<SaleOrderItem> findByOrderId(Long orderId);
    
    List<SaleOrderItem> findByProductId(Long productId);
    
    void deleteByOrderId(Long orderId);
}
